﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;

namespace VM.Common.DataUntil
{
    public  class Timestamp
    {

        /// <summary>
        /// 获取当前时间戳
        /// </summary>
        /// <returns></returns>
        public static long  getNowTimeStamp() {

            DateTime now = DateTime.Now;
            long timeStamp = (long)(now - new DateTime(1970, 1, 1)).TotalSeconds;
            // 获取当前时间戳（以秒为单位）
            return timeStamp; 
        }
    }
}
